home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / snowball.swf / scripts / frame_31 / PlaceObject2_358_70 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2011-08-19  |  1.3 KB  |  59 lines

  1. onClipEvent(enterFrame){
  2.    if(smashup == 1)
  3.    {
  4.       this.gotoAndPlay("smashup");
  5.       smashup = 0;
  6.    }
  7.    if(_root.gameon == 1)
  8.    {
  9.       _X = _X - xspeed;
  10.    }
  11.    if(this._y < 100)
  12.    {
  13.       _Y = _Y + yspeed;
  14.       yspeed += 0.01;
  15.    }
  16.    else if(_root.gameon)
  17.    {
  18.       if(_root.topbg._y > -500)
  19.       {
  20.          _root.topbg._y -= yspeed;
  21.          _root.startmoving = 1;
  22.          _root.readygo.play();
  23.          _root.readygo._name = "displayer";
  24.       }
  25.       if(Key.isDown(37))
  26.       {
  27.          xspeed += 2 / (_root.weight * 0.01);
  28.          if(xspeed > 10 && _root.weight < 200)
  29.          {
  30.             xspeed = 10;
  31.          }
  32.       }
  33.       else if(Key.isDown(39))
  34.       {
  35.          xspeed -= 2 / (_root.weight * 0.01);
  36.          if(xspeed < -10 && _root.weight < 200)
  37.          {
  38.             xspeed = -10;
  39.          }
  40.       }
  41.       else if(xspeed != 0)
  42.       {
  43.          if(xspeed < 0)
  44.          {
  45.             xspeed += 2 / (_root.weight * 0.05);
  46.          }
  47.          else if(xspeed > 0)
  48.          {
  49.             xspeed -= 2 / (_root.weight * 0.05);
  50.          }
  51.       }
  52.       _root.weight += 1;
  53.       yspeed = _root.ballspeed + _root.weight / 140;
  54.       hspeed = 100 / _root.weight / 5;
  55.       _xscale = 20 + _root.weight / 13;
  56.       _yscale = _xscale;
  57.    }
  58. }
  59.